// webrtc vad test
#include <stdlib.h>
#include <stdio.h>

#if 0
// common_vad测试
#include "common_audio/vad/include/webrtc_vad.h"
int main(int argc, char *argv[])
{
    VadInst *handle;
    handle = WebRtcVad_Create();

    WebRtcVad_Free(handle);
    printf("webrtc vad test......\n");
    return 0;
}
#endif

#if 1
// aec3测试，成功
#include "api/audio/echo_control.h"
#include "api/audio/echo_canceller3_config.h"
#include "modules/audio_processing/aec3/echo_canceller3.h"
using namespace webrtc;

int main(int argc, char *argv[])
{ 
    EchoCanceller3Config config;
    std::optional<EchoCanceller3Config> multichannel_config;   
    std::unique_ptr<EchoControl> echo_controller = std::make_unique<EchoCanceller3>(
        config, multichannel_config, 16000, 1, 1);
    printf("aec3 test........\n");
    return 0;
}
#endif

#if 0
// aecm测试
#include "modules/audio_processing/aecm/echo_control_mobile.h"
using namespace webrtc;

int main(int argc, char *argv[])
{
    void *aecmInst = WebRtcAecm_Create();
    WebRtcAecm_Init(aecmInst, 16000);

    WebRtcAecm_Free(aecmInst);
    printf("aecm test......\n");
    return 0;
}
#endif

#if 0
// rnn-vad测试
#include "modules/audio_processing/agc2/rnn_vad/rnn.h"
#include "modules/audio_processing/agc2/rnn_vad/features_extraction.h"
#include "modules/audio_processing/agc2/cpu_features.h"
using namespace webrtc;

int main(int argc, char *argv[])
{
    AvailableCpuFeatures features = GetAvailableCpuFeatures();
    rnn_vad::FeaturesExtractor features_extractor_(features);
    rnn_vad::RnnVad rnn_vad_(features);
    return 0;
}
#endif

#if 0
int main(int argc, char *argv[])
{
    return 0;
}
#endif